package crafex.engine.system;

import java.util.ArrayList;

import crafex.resource.items.Gun;
import crafex.resource.items.gunparts.GunPart;


public class Profile {
	private static String name;
	private final String s_name = "-name=";
	private static int level;
	private final String s_level = "-level=";
	private static int xp;
	private final String s_xp = "-xp=";
	private static int monies;
	private final String s_monies = "-monies=";
	private static long totalCoinsCollected;
	private final String s_totalCoinsCollected = "-totalcoinscollected=";
	private static Gun[] guns;
	private final String s_gun = "-gun=";
	private static GunPart[] gunParts;
	private final String s_gunPart = "-gunpart=";
	
	public Profile(){

	}
	
	public void newProfile(String name){
		
		Profile.name = name;
		level = 1;
		xp = 0;
		monies = 0;
		totalCoinsCollected = 0;
		guns = new Gun[10];
		gunParts = new GunPart[75];
	}
	
	public String[] saveProfile(){
		ArrayList<String> data = new ArrayList<String>();
		data.add(s_name + name);
		data.add(s_level + String.valueOf(level));
		data.add(s_xp + String.valueOf(xp));
		data.add(s_monies + String.valueOf(monies));
		data.add(s_totalCoinsCollected + String.valueOf(totalCoinsCollected));
		//TODO work on profile system
		
		return null;
	}
	
	public void loadProfile(String[] data){
		//TODO make profile loading
	}

	public static String getName() {
		return name;
	}

	public static void setName(String name) {
		Profile.name = name;
	}

	public static int getLevel() {
		return level;
	}

	public static void setLevel(int level) {
		Profile.level = level;
	}

	public static int getXp() {
		return xp;
	}

	public static void setXp(int xp) {
		Profile.xp = xp;
	}

	public static int getMonies() {
		return monies;
	}

	public static void setMonies(int monies) {
		Profile.monies = monies;
	}

	public static long getTotalCoinsCollected() {
		return totalCoinsCollected;
	}

	public static void setTotalCoinsCollected(long totalCoinsCollected) {
		Profile.totalCoinsCollected = totalCoinsCollected;
	}

	public static Gun[] getGuns() {
		return guns;
	}

	public static void setGuns(Gun[] guns) {
		Profile.guns = guns;
	}

	public static GunPart[] getGunParts() {
		return gunParts;
	}

	public static void setGunParts(GunPart[] gunParts) {
		Profile.gunParts = gunParts;
	}

	public String getS_name() {
		return s_name;
	}

	public String getS_level() {
		return s_level;
	}

	public String getS_xp() {
		return s_xp;
	}

	public String getS_monies() {
		return s_monies;
	}

	public String getS_totalCoinsCollected() {
		return s_totalCoinsCollected;
	}

	public String getS_gun() {
		return s_gun;
	}

	public String getS_gunPart() {
		return s_gunPart;
	}
}
